<!DOCTYPE html>
<html>
<head>
    <!-- from: https://phaser.io/sandbox/frame -->
    <meta charset="utf-8" />
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta name="author" content="gsw945" />
    <link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
    <title>Phaser Demo With Parcel</title>
    <link rel="stylesheet" href="styles.css" />
    <style type="text/css">
        body,
        html {
            margin: 0;
            padding: 0;
            border: 0;
        }
        #container {
            display: inline-block;
            width: calc(50vw - 1em);
            height: auto;
            border: 1px solid #fa1;
        }
        #sandboxed {
            width: calc(100% - 2em);
            min-height: 10em;
            margin-left: 1em;
        }
        #chains {
            display: inline-block;
            width: calc(50vw - 1em);
            border: 1px solid #fa1;
            min-height: 20em;
            vertical-align: top;
        }
        #gameSizeW,
        #gameSizeH {
            width: 5em;
        }
        #editor > textarea {
            width: calc(100% - 2em);
            min-height: 10em;
            margin-left: 1em;
        }
    </style>
</head>
<body>
    <!-- <h1>Hello, World!</h1> -->
    <div class="page-body">
        <div id="container">
            <div id="editor">
                <textarea title="editor"></textarea>
            </div>
            <div id="sandbox-container">
                <iframe title="sandbox" sandbox="allow-scripts" id="sandboxed" src="./sandbox.html"></iframe>
                <br />
                <strong>Size: </strong> 
                <input type="number" id="gameSizeW" name="width" value="400" /> x 
                <input type="number" id="gameSizeH" name="height" value="400" />
                <input type="button" id="updateSize" value="update" />
            </div>
        </div>
        <iframe title="chains" id="chains" src="https://phaser.io/learn/chains/slim"></iframe>
    </div>
    <script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.5.1/jquery.min.js" type="text/javascript"></script>
    <script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/phaser/3.52.0/phaser.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    var gameWidth = '400';
    var gameHeight = '400';
    var code = [ 
        "function preload() {\n    //\n}", 
        "function create() {\n    //\n}", 
        "function update() {\n    //\n}", 
        "function render() {\n    //\n}"
    ].join('\n\n');
    </script>
    <script type="module" src="./index.js"></script>
    <script type="text/javascript">
    var confirmOnPageExit = function (e)  {
        // If we haven't been passed the event get the window.event
        e = e || window.event;
        var message = 'Any text will block the navigation';
        // For IE6-8 and Firefox prior to version 4
        if (e) {
            e.returnValue = message;
        }
        // For Chrome, Safari, IE8+ and Opera 12+
        return message;
    };
    window.addEventListener('beforeunload', confirmOnPageExit);
    </script>
</body>
</html>